/**
 * 
 */
package rmi;

import java.net.MalformedURLException;
import java.net.UnknownHostException;
import java.rmi.RemoteException;

/**
 * @author Elkin Torres
 * 
 */
public class Registros {

	public void registrarControlRemoto() throws RemoteException,
			UnknownHostException, MalformedURLException {
		/*if (System.getSecurityManager() == null){
			System.setSecurityManager(new RMISecurityManager());
			System.out.println("crea seguridad, estudiante");
		}
		try {
			Registry registro = LocateRegistry.getRegistry(5001);
			registro.list();
			System.out.println("crea seguridad, estudiante");
		} catch (Exception e) {
			Registry registro = LocateRegistry.createRegistry(5001);
			System.out.println("Registro RMI creado en el puerto 5001, estudiante");
		}*/
		/*System.out.println("paso seguridad, estudante");
		String url = "rmi://" + InetAddress.getLocalHost().getHostAddress()+ ":5001/gestionEscritorio";
		System.out.println(url);
		IControlRemoto stub = new ControlRemoto();
		
		Naming.rebind(url, (Remote) stub);*/
	}
}
